<html>
<head><meta charset="utf-8"><title>Internal stability checking for libstd/libcore · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Internal.20stability.20checking.20for.20libstd.2Flibcore.html">Internal stability checking for libstd/libcore</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="168668380"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Internal%20stability%20checking%20for%20libstd/libcore/near/168668380" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Vadim Petrochenkov <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Internal.20stability.20checking.20for.20libstd.2Flibcore.html#168668380">(Jun 21 2019 at 09:50)</a>:</h4>
<p>IIRC, <span class="user-mention" data-user-id="120791">@RalfJ</span> wanted libcore to require <code>#![feature(my_feature)]</code> when a library feature <code>my_feature</code> is used even if it's defined in libcore itself (that would be helpful for things like eliminating <code>mem::uninitialized</code> or something like that).</p>



<a name="168668496"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Internal%20stability%20checking%20for%20libstd/libcore/near/168668496" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Vadim Petrochenkov <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Internal.20stability.20checking.20for.20libstd.2Flibcore.html#168668496">(Jun 21 2019 at 09:53)</a>:</h4>
<p>That sounded very reasonable and I tried it today.<br>
The switch itself is trivial, but doing that naively gives more noise than signal.<br>
The two primary problems are:<br>
- Derives on unstable types and impls for unstable types<br>
- Imports/reexports of unstable names</p>



<a name="168668617"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Internal%20stability%20checking%20for%20libstd/libcore/near/168668617" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Vadim Petrochenkov <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Internal.20stability.20checking.20for.20libstd.2Flibcore.html#168668617">(Jun 21 2019 at 09:55)</a>:</h4>
<p>So, this needs some notion of "<em>really</em> used" excluding impls and imports, with feature gates being required only for really used entities.</p>



<a name="168668706"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Internal%20stability%20checking%20for%20libstd/libcore/near/168668706" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Vadim Petrochenkov <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Internal.20stability.20checking.20for.20libstd.2Flibcore.html#168668706">(Jun 21 2019 at 09:57)</a>:</h4>
<p>The current list of libcore's own features used by libcore (noisy variant):</p>
<div class="codehilite"><pre><span></span>#![feature(c_variadic)]
#![feature(coerce_unsized)]
#![feature(core_intrinsics)]
#![feature(core_panic)]
#![feature(core_private_bignum)]
#![feature(core_private_diy_float)]
#![feature(dec2flt)]
#![feature(dispatch_from_dyn)]
#![feature(duration_float)]
#![feature(exact_size_is_empty)]
#![feature(fixed_size_array)]
#![feature(flt2dec)]
#![feature(fmt_internals)]
#![feature(fn_traits)]
#![feature(generator_trait)]
#![feature(hashmap_internals)]
#![feature(int_error_matching)]
#![feature(panic_internals)]
#![feature(pattern)]
#![feature(ptr_internals)]
#![feature(raw)]
#![feature(receiver_trait)]
#![feature(renamed_spin_loop)]
#![feature(slice_from_raw_parts)]
#![feature(slice_index_methods)]
#![feature(slice_internals)]
#![feature(stdimd_internal)]
#![feature(stdsimd)]
#![feature(step_trait)]
#![feature(str_internals)]
#![feature(trusted_len)]
#![feature(try_trait)]
#![feature(unicode_internals)]
#![feature(unicode_version)]
#![feature(unsize)]
</pre></div>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>